<template>
<div class="dtv1">
  <p>
    <router-link :to="{path:'/TenderhallList',query: {k:1}}" ><span id="jumpTo">{{number}}</span>秒后自动返回招标大厅,也可点击本处直接返回招标大厅</router-link>
  </p>
</div>
</template>

<script>

  export default {
    data () {
      return {
        number:10,
        count:''
      }
    },
    methods: {
      getCode(){

        const TIME_COUNT = 10;
        if (!this.timer) {
          this.count = TIME_COUNT;
          this.timer = setInterval(() => {
            if (this.count > 0 && this.count <= TIME_COUNT) {
              this.count--;
              this.number=this.count
            } else {
              clearInterval(this.timer);
              this.timer = null;
              this.$router.push({path:'/TenderhallList',query: {k:1}})
            }
          }, 1000)
        }
        }
    },
    mounted () {
      this.getCode()
    },
    components: {

    }
  }
</script>

<style scoped>
  .dtv1{
    width:100%;
    height:100%;
    background:#f1f1f1;
  }
  p{
    margin: 10px auto;
    /* width: 350px; */
    height: 855px;
    background: url(../assets/toubiaocg2.png) no-repeat center center;
    /* padding-left: 950px; */
    /* padding-top: 30px; */
    text-align: center;
    /* vertical-align: middle; */
    line-height: 950px;
  }
  p a{
    text-decoration: none;
    color: red;
    font-weight: bolder;
    font-size: 20px;
    border-bottom:1px solid red	}
  p a:hover{
    color:red;
  }
</style>
